package entity;

public class Product {
    private int productId;           // 商品ID
    private int userId;              // 用户ID
    private String productName;      // 商品名称
    private String productDescription; // 商品描述
    private double price;            // 商品价格
    private int stockQuantity;
    private  String image;// 库存数量

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    // 构造方法
    public Product() {}

    public Product(int productId, int userId, String productName, String productDescription, double price, int stockQuantity) {
        this.productId = productId;
        this.userId = userId;
        this.productName = productName;
        this.productDescription = productDescription;
        this.price = price;
        this.stockQuantity = stockQuantity;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductDescription() {
        return productDescription;
    }

    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getStockQuantity() {
        return stockQuantity;
    }

    public void setStockQuantity(int stockQuantity) {
        this.stockQuantity = stockQuantity;
    }

    @Override
    public String toString() {
        return "Product{" +
                "productId=" + productId +
                ", userId=" + userId +
                ", productName='" + productName + '\'' +
                ", productDescription='" + productDescription + '\'' +
                ", price=" + price +
                ", stockQuantity=" + stockQuantity +
                '}';
    }
}
